#pragma once

#include "Infra/String.h"
#include "Infra/Vector.h"
#include "Infra/Function.h"
#include "GenICam/System.h"

// IPCfg 对话框
// IPCfg dialog

class IPCfg : public CDialog
{
	DECLARE_DYNAMIC(IPCfg)

public:
	IPCfg(CWnd* pParent = NULL);   // 标准构造函数 | construct function
	virtual ~IPCfg();

// 对话框数据 | dialog data
	enum { IDD = IDD_IP_CFG };

	typedef Dahua::Infra::TFunction0<void> SetIPProc;
	
	void init(Dahua::GenICam::ICameraPtr& camera, SetIPProc const& proc);
	
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持 | DDX/DDV  support

	DECLARE_MESSAGE_MAP()

private:
	
	void fillAddress(Dahua::Infra::CString str, CIPAddressCtrl* ctrl);

	Dahua::GenICam::ICameraPtr _cameraPtr;
	SetIPProc                  _setIpCallBack;
public:
	afx_msg void OnClose();
	afx_msg void OnBnClickedBtnSetip();
};
